window.onload =( function () {
    //DrawTable(null);
    console.log("device");
    $.ajax({
            type: "get",
            url: "/getAllDevice",
            dataType: "json",
            success: function (res) {
                console.log(res);
                var list = res.data.deviceList;
                console.log("test" + list);
                for (var i = 0; i < list.length; i++) {
                    $('#alldevice').append(
                        "<tr>\n" +
                        "                                <td>" + res.data.deviceList[i].deviceId + "</td>\n" +
                        "                                <td>" + res.data.deviceList[i].devicePlace + "</td>\n" +
                        "                                <td>" + res.data.deviceList[i].deviceType + "</td>\n" +
                        "                            </tr>")
                }
            }
        }
    )
});

var $$ = mdui.JQ;

$$('#open').on('click', function () {
    mdui.snackbar({
        message: 'Message sent'
    });
});



